package com.orhon.smartcampus.modules.schoolaffairs.nm;


import java.util.List;

import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import com.orhon.smartcampus.modules.schoolaffairs.entity.SchoolFormula;
import com.orhon.smartcampus.modules.schoolaffairs.gqlModel.GQLSchoolFormula;

@Mapper
public interface SchoolFormulaMapper {

    SchoolFormulaMapper MAPPER = Mappers.getMapper(SchoolFormulaMapper.class);

    @Mappings({
            @Mapping(source = "id" , target = "id"),
            @Mapping(source = "title" , target = "title"),
            @Mapping(source = "createdAt" , target = "created_at"),
            @Mapping(source = "createdBy" , target = "created_by"),
            @Mapping(source = "updatedAt" , target = "updated_at"),
            @Mapping(source = "deletedAt" , target = "deleted_at"),
            //@Mapping(ignore = true, target = "school"),
            @Mapping(ignore = true, target = "publisher")
    })
    GQLSchoolFormula toSchoolFormula(SchoolFormula entity);

    @InheritConfiguration(name = "toSchoolFormula")
    List<GQLSchoolFormula> toSchoolFormulaList(List<SchoolFormula> schoolFormula);
}
